<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>SQLite3 类</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="sqlite3.constants.html">预定义常量</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="sqlite3.busytimeout.html">SQLite3::busyTimeout</a></div>
 <div class="up"><a href="book.sqlite3.html">SQLite3</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="class.sqlite3" class="reference">
 <h1 class="title">SQLite3 类</h1>
 

 <div class="partintro"><p class="verinfo">(PHP 5 &gt;= 5.3.0)</p>


  <div class="section" id="sqlite3.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    实现与 SQLite 3 数据库对接的类。
   </p>
  </div>


  <div class="section" id="sqlite3.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <strong class="classname">SQLite3</strong>
     </span>
     {</div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="sqlite3.busytimeout.html" class="methodname">busyTimeout</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$msecs</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="sqlite3.changes.html" class="methodname">changes</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="sqlite3.close.html" class="methodname">close</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="sqlite3.construct.html" class="methodname">__construct</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$filename</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$encryption_key</code></span>
  ]] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="sqlite3.createaggregate.html" class="methodname">createAggregate</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>
   , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$step_callback</code></span>
   , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$final_callback</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$argument_count</code><span class="initializer"> = -1</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="sqlite3.createcollation.html" class="methodname">createCollation</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>
   , <span class="methodparam"><span class="type"><a href="language.types.callable.html" class="type callable">callable</a></span> <code class="parameter">$callback</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="sqlite3.createfunction.html" class="methodname">createFunction</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>
   , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$callback</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$argument_count</code><span class="initializer"> = -1</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">static</span> <span class="type">string</span><span class="methodname"><a href="sqlite3.escapestring.html" class="methodname">escapeString</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="sqlite3.exec.html" class="methodname">exec</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$query</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="sqlite3.lasterrorcode.html" class="methodname">lastErrorCode</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="sqlite3.lasterrormsg.html" class="methodname">lastErrorMsg</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="sqlite3.lastinsertrowid.html" class="methodname">lastInsertRowID</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="sqlite3.loadextension.html" class="methodname">loadExtension</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$shared_library</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="sqlite3.open.html" class="methodname">open</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$filename</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code><span class="initializer"> = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE</span></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$encryption_key</code></span>
  ]] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">SQLite3Stmt</span><span class="methodname"><a href="sqlite3.prepare.html" class="methodname">prepare</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$query</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">SQLite3Result</span><span class="methodname"><a href="sqlite3.query.html" class="methodname">query</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$query</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="sqlite3.querysingle.html" class="methodname">querySingle</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$query</code></span>
   [, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$entire_row</code><span class="initializer"> = false</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">static</span> <span class="type">array</span><span class="methodname"><a href="sqlite3.version.html" class="methodname">version</a></span>
    ( <span class="methodparam">void</span>
   )</div>

   }</div>


  </div>

 </div>

 






























































































































<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="sqlite3.busytimeout.html">SQLite3::busyTimeout</a> — Sets the busy connection handler</li><li><a href="sqlite3.changes.html">SQLite3::changes</a> — Returns the number of database rows that were changed (or inserted or
   deleted) by the most recent SQL statement</li><li><a href="sqlite3.close.html">SQLite3::close</a> — Closes the database connection</li><li><a href="sqlite3.construct.html">SQLite3::__construct</a> — Instantiates an SQLite3 object and opens an SQLite 3 database</li><li><a href="sqlite3.createaggregate.html">SQLite3::createAggregate</a> — Registers a PHP function for use as an SQL aggregate function</li><li><a href="sqlite3.createcollation.html">SQLite3::createCollation</a> — Registers a PHP function for use as an SQL collating function</li><li><a href="sqlite3.createfunction.html">SQLite3::createFunction</a> — Registers a PHP function for use as an SQL scalar function</li><li><a href="sqlite3.escapestring.html">SQLite3::escapeString</a> — Returns a string that has been properly escaped</li><li><a href="sqlite3.exec.html">SQLite3::exec</a> — Executes a result-less query against a given database</li><li><a href="sqlite3.lasterrorcode.html">SQLite3::lastErrorCode</a> — Returns the numeric result code of the most recent failed SQLite request</li><li><a href="sqlite3.lasterrormsg.html">SQLite3::lastErrorMsg</a> — Returns English text describing the most recent failed SQLite request</li><li><a href="sqlite3.lastinsertrowid.html">SQLite3::lastInsertRowID</a> — Returns the row ID of the most recent INSERT into the database</li><li><a href="sqlite3.loadextension.html">SQLite3::loadExtension</a> — Attempts to load an SQLite extension library</li><li><a href="sqlite3.open.html">SQLite3::open</a> — Opens an SQLite database</li><li><a href="sqlite3.prepare.html">SQLite3::prepare</a> — Prepares an SQL statement for execution</li><li><a href="sqlite3.query.html">SQLite3::query</a> — Executes an SQL query</li><li><a href="sqlite3.querysingle.html">SQLite3::querySingle</a> — Executes a query and returns a single result</li><li><a href="sqlite3.version.html">SQLite3::version</a> — Returns the SQLite3 library version as a string constant and as a number</li></ul>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="sqlite3.constants.html">预定义常量</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="sqlite3.busytimeout.html">SQLite3::busyTimeout</a></div>
 <div class="up"><a href="book.sqlite3.html">SQLite3</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
